<template>
	<div class="manage_page fillcontain">
		<el-row style="height: 100%;">
			<el-col :span="4"  style="min-height: 100%; background-color: #324057; user-select: none;">
				<el-menu :default-active="defaultActive" style="min-height: 100%;" theme="dark" router>
					<el-submenu index="2">
						<template slot="title"><i class="el-icon-document"></i>数据管理</template>
						<el-menu-item index="userList">用户列表</el-menu-item>
					</el-submenu>
					<el-submenu index="6">
						<template slot="title"><i class="el-icon-setting"></i>设置</template>
						<el-menu-item index="adminSet">管理员设置</el-menu-item>
                        <el-menu-item index="openNews" v-if="adminInfo.identityType === 1">开通权限</el-menu-item>
					</el-submenu>
					<el-submenu index="7">
						<template slot="title"><i class="el-icon-warning"></i>说明</template>
						<el-menu-item index="explain">说明</el-menu-item>
					</el-submenu>
				</el-menu>
			</el-col>
			<el-col :span="20" style="height: 100%;overflow: auto;">
				<keep-alive>
					<router-view></router-view>
				</keep-alive>
			</el-col>
		</el-row>
  	</div>
</template>

<script>
import { mapGetters } from 'vuex'

export default {
  computed: {
    defaultActive: function() {
      return this.$route.path.replace("/", "")
    },
    ...mapGetters([
      'adminInfo'
    ])
  }
}
</script>

<style lang="less" scoped>
@import "../style/mixin";
</style>
